package com.ce.pms.charge.model;

import java.io.Serializable;

import javax.persistence.Column;

public class ViewCompositeID implements Serializable {

	@Column(name = "TRANSACTION_ID")
	public Long transId;

	@Column(name = "MASTER_T_TRANS_ID", nullable = true)
	public Long masterTransId;

	public Long getMasterTransId() {
		return masterTransId;
	}

	public void setMasterTransId(Long masterTransId) {
		this.masterTransId = masterTransId;
	}

	public Long getTransId() {
		return transId;
	}

	public void setTransId(Long transId) {
		this.transId = transId;
	}

	public ViewCompositeID() {
	}

	public ViewCompositeID(Long transId, Long masterTransId) {
		this.transId = transId;
		this.masterTransId = masterTransId;
	}

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((masterTransId == null) ? 0 : masterTransId.hashCode());
		result = PRIME * result + ((transId == null) ? 0 : transId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ViewCompositeID other = (ViewCompositeID) obj;
		if (masterTransId == null) {
			if (other.masterTransId != null)
				return false;
		} else if (!masterTransId.equals(other.masterTransId))
			return false;
		if (transId == null) {
			if (other.transId != null)
				return false;
		} else if (!transId.equals(other.transId))
			return false;
		return true;
	}

}
